#!/usr/bin/env perl

use utf8;
use strict;
use autodie;
use 5.010;

say "Input some line :";

chomp(my @input = <STDIN>);

say "Input width :";

chomp(my $width = <STDIN>);

my @rule = "1234567890" x ($width / 10 + 4);

say @rule;

foreach my $line (@input){
	printf "%${width}s\n", $line;
}
